#!/usr/bin/env python
def commentLine(line):
	"""Comment a line if it doesn't start with a number"""
	if line[0] == "#": return line
	try: float(line.split()[0]); return line
	except: return "#"+line
	
import sys

if len(sys.argv)>1:
	for filename in sys.argv[1:]:
		lines=open(filename).readlines()
		outFile = open(filename, 'w')
		for line in lines: outFile.write(commentLine(line))
else:
	for line in sys.stdin:
		sys.stdout.write(commentLine(line))

